<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	HttpServletRequest r = request;
	String path = r.getContextPath();
	String basePath = r.getScheme() + "://" + r.getServerName() + ":" + r.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<meta charset="UTF-8">
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
	<hr>
	<%-- 	<%
		Object f = request.getAttribute("loginFlag");
		if (f != null) {
	%> --%>
	<!-- <div>
		<span style="font-size: 18px; color: red;">用户名或密码错误</span>
	</div> -->
	<%-- 	<%
		}
	%>
	<%
		Object pwd = session.getAttribute("pwd");
		if (pwd != null) {
	%>
	<div>
		<span style="font-size: 18px; color: red;">密码修改成功,请重新登录！！</span>
	</div>
	<%
		}
		session.removeAttribute("pwd");
	%> --%>
	<!-- 使用jstl技术 -->
	<c:choose>
		<c:when test="${loginFlag == 0}">
			<div>
				<span style="font-size: 18px; color: red;">用户名或密码错误</span>
			</div>
		</c:when>
		<c:when test="${pwd == 1}">
			<div>
				<span style="font-size: 18px; color: red;">密码修改成功,请重新登录！！</span>
			</div>
			<c:remove var="pwd" scope="session" />
		</c:when>
	</c:choose>
	<form action="user" method="get">
		<input type="hidden" name="oper" value="login">
		<label>用户名：</label>
		<input type="text" name="uname" placeholder="请输入用户名" />
		<label>用户名：</label>
		<input type="password" name="pwd" placeholder="请输入密码" />
		<input type="submit" value="登录">
	</form>
	<br />
	<a href="main/reg.jsp">注册</a>
	<a href="#">忘记密码</a>


</body>
</html>